<!-- 	
		The home page view : app/views/resumes/home.html.erb
		controller: resume, action: home
		URL or URL/home 	- when user is logged in
-->

<link rel="stylesheet" type="text/css" href="/stylesheets/resume_common.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/resumes/home.css" />	

<div class="heading">
	<h3> Welcome ... <%=h @user.username %> </h3>
	<div class="links">	
	<h3 class="new_resume_button"> <%= link_to 'New resume', '/new' %> </h3>
	</div>	
</div>

<% form_tag('', :method => "post") do %>	<!-- for authenticity token -->
<% if @resumes %>
<table class="resume_table">
	<tr>
		<th> Resume title 	</th>
		<th> Last modified 	</th>
		<th> Public Status	</th>
	</tr>
	
	<% @resumes.each do |resume| %>
	<%# isDefault = (@user.default_resume==resume.id) ? true : false %>
	<tr id=<%= 'resume_'+resume.id.to_s %> >
		<td class="resume_title">
			<%= link_to resume.title, '/show/'+resume.title %>
			<%#= isDefault ? '<span>*</span>' : ''   %>
		</td>
		<td class="updated_at">
			<% d = resume.updated_at %>
			<%= d.to_s(:long) %>
		</td>
		<td class="public_status">
			<%=h resume.public_status %>	
		</td>
		<td><%= link_to 'Print', '/show_p/'+resume.title %>	</td>
	</tr>
	<% end #loop %>
</table>	

<!-- <div id="guide_text">
	* default resume - appears in your url
</div> -->
<% end #if %>
<% end #form %>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="/javascripts/resume_common.js"></script>
<script type="text/javascript" src="/javascripts/resumes/home.js"></script>